package com.hcf.admin.common.convention.exception;

import com.hcf.admin.common.convention.errorcode.BaseErrorCode;
import com.hcf.admin.common.convention.errorcode.IErrorCode;

public class RemoteException extends AbstractException{
    public RemoteException(String message) {
        this(BaseErrorCode.REMOTE_ERROR, null, message);
    }

    public RemoteException(String message, IErrorCode code) {
        this(code, null, message);
    }

    public RemoteException(IErrorCode code) {
        this(code, null, null);
    }

    public RemoteException(IErrorCode code, Throwable throwable, String message) {
        super(code, throwable, message);
    }

    @Override
    public String toString() {
        return "RemoteException{" +
                "message='" + message + '\'' +
                ", code='" + code + '\'' +
                '}';
    }
}
